<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="renderer" content="webkit">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>项目信息</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
 <div class="Wrapper">
        <div>
           <div id="pageInTab" class="pageInTab">
		   <div tabid="tabA" title="基本信息" lselected="true">
		<form id="fnc_prj_bsc_info_form" >
             <div class="fieldset1 tabel_col clearFix">
              <div class="fieldBox col_100">
                    <div class="label">项目名称</div>
                    <div class="field">
                        <input name="fncprjnm" id="fncprjnm" type="text" class="ui-textbox" value="${fncprjnm}" validate="{required:true}">
                    </div>
             </div>
             <div class="fieldBox col_50">
                    <div class="label">金融机构</div>
                    <div class="field">
                        <input name="fncinsid" id="fncinsid" type="text" class="ui-textbox" value="" placeholder="请选择"  ltype="combobox" validate="{required:true}">
                    </div>
                    <div style="display: none"></div>
             </div>
             <div class="fieldBox col_50">
                    <div class="label">金融机构类型</div>
                    <div class="field">
                        <input name="instypecd" id="instypecd" type="text" class="ui-textbox" value="" placeholder="请选择"  ltype="combobox" validate="{required:true}">
                    </div>
                    <div style="display: none"></div>
             </div>
             <div class="fieldBox col_50">
                    <div class="label">融资报价</div>
                    <div class="field">
                        <input name="fncscmid" id="fncscmid" type="text" class="ui-textbox" value="" placeholder="请选择"  ltype="combobox" validate="{required:true}">
                    </div>
                    <div style="display: none">
                    </div>
             </div>
              <div class="fieldBox col_50">
                    <div class="label">授信主体</div>
                    <div class="field">
                        <input name="crsbj" id="crsbj" type="text" class="ui-textbox" value="" placeholder="请选择"  ltype="combobox" validate="{required:true}">
                    </div>
                    <div style="display: none">
                    </div>
             </div>
           <div class="fieldBox col_50">
                    <div class="label">国家</div>
                    <div class="field">
                        <input name="country" id="country" type="text" class="ui-textbox" value="" placeholder="请选择"  ltype="combobox" validate="{required:true}">
                    </div>
                    <div style="display: none">
                    </div>
            </div>
                
		 <div class="fieldBox col_50">
                <div class="label">业务类型</div>
                <div class="field">
                    <input name="bustype" id="bustype" type="text" class="ui-textbox" value="" placeholder="请选择"  ltype="combobox" validate="{required:true}">
               <input name="prjid" id="prjid" type="hidden" value="${id}">
               <input name="wthrddct" id="wthrddct" type="hidden" value=" ${fncPrjBscInfoVO.wthrddct}">
                </div>
                <div style="display: none">
                </div>
              </div>
              <div class="fieldBox col_50">
           <div class="label">融资金额</div>
            <div class="field">
                <span id="fncfiamt" name="fncfiamt">&nbsp; ${fncPrjBscInfoVO.fncfiamt/100}</span>
            </div>
          </div> 
           <div class="fieldBox col_50">
           <div class="label">折扣率</div>
            <div class="field">
                <span id="fncfiamt" name="fncfiamt">&nbsp;${fncPrjBscInfoVO.dcnRate*100}%</span>
            </div>
          </div> 
          <div class="fieldBox col_50">
             <div class="label">项目金额</div>
             <div class="field">
                   <span id="fncprjamt" name="fncprjamt">&nbsp;${fncPrjBscInfoVO.fncprjamt/100}</span>
             </div>
          </div> 
          
           <div class="fieldBox col_50">
           <div class="label">支付表数量</div>
            <div class="field">
                <span id="paySchCount" name="paySchCount">&nbsp;${fncPrjBscInfoVO.paySchCount}</span>
            </div>
          </div>  
          <div class="fieldBox col_50">
           <div class="label">是否出表<font color="red"></font></div>
            <div class="field">
            	
                <input type="radio" name="isOut"  value="1" <c:if test="${fncPrjBscInfoVO.isOut==1}">checked</c:if> />出表
                <input type="radio" name="isOut"  value="0"  <c:if test="${fncPrjBscInfoVO.isOut!=1}">checked</c:if>/>不出表
                
            </div>
          </div>
           <div class="fieldBox col_50">
           <div class="label">合同审核<font color="red">*</font></div>
            <div class="field">
            	<select id="contractAudit"  name="contractAudit"  validate="{required:true}">
					<option value="">请选择</option>
					<option value="1" <c:if test="${fncPrjBscInfoVO.contractAudit==1}"> selected="selected" </c:if> >需要</option>
					<option value="0" <c:if test="${fncPrjBscInfoVO.contractAudit==0}"> selected="selected" </c:if>>不需要</option>
				</select>
            </div>
          </div>
          <div class="fieldBox col_100">
                    <div class="label">机构帐号批次</div>
                    <div class="field">
                        <input name="limId" id="limId" type="text" class="ui-textbox" value="${fncPrjBscInfoVO.limId}" placeholder="请选择"  ltype="combobox" >
                    </div>
                    <div style="display: none"></div>
         </div>  
         <!-- 是否分账  add by gengchunlan 20200303 --> 
         <div class="fieldBox col_50">
               <div class="label">是否分账</div>
                    <div class="field">
                        <select name="isSplitAccount" id="isSplitAccount"  onchange="isShowAccount(this);">
                        	<option value="2" <c:if test="${fncPrjBscInfoVO.isSplitAccount==2}">selected</c:if>  >否</option>
                        	<option value="1" <c:if test="${fncPrjBscInfoVO.isSplitAccount==1}">selected</c:if>  >是</option>
                        </select>
                    </div>
         </div>
          <div class="fieldBox col_50">
               <div class="label">分账业务短信提醒</div>
                    <div class="field">
                        <select name="isSplitMsg" id="isSplitMsg"  >
                        	<option value="0" <c:if test="${fncPrjBscInfoVO.isSplitMsg=='0'}">selected</c:if>  >否</option>
                        	<option value="1" <c:if test="${fncPrjBscInfoVO.isSplitMsg=='1'}">selected</c:if>  >是</option>
                        </select>
                    </div>
         </div>   
         <!-- end by gengchunlan  20200303-->    
           <!-- 垫款先注释掉2018-4-25
           <div class="fieldBox col_50">
           <div class="label">是否参与垫款<font color="red">*</font></div>
            <div class="field">
                <input type="radio" name="isAdv"  value="1" <c:if test="${fncPrjBscInfoVO.isAdv==1}">checked</c:if> />参与
                <input type="radio" name="isAdv"  value="0"  <c:if test="${fncPrjBscInfoVO.isAdv!=1}">checked</c:if>/>不参与
                
            </div>
          </div>   
          <div class="fieldBox col_50">
           <div class="label">是否开启<font color="red">*</font></div>
            <div class="field">
                <input type="radio" name="isSAdv"  value="1" <c:if test="${fncPrjBscInfoVO.isSAdv==1}">checked</c:if> >开启                
                <input type="radio" name="isSAdv"  value="0"  <c:if test="${fncPrjBscInfoVO.isSAdv!=1}">checked</c:if>>关闭
            </div>
          </div>
          <div  class="btnsBox">
	          <table style="BORDER-COLLAPSE: collapse;margin-bottom:20px" borderColor=#ECECEC height=40 cellPadding=1 width="100%" align=center border=1> 
					 <tr align=center   style="background:#E7FEF4">
	          				<td width="20%">账户类型</td><td width="20%">户名</td><td width="20%">账号</td><td width="20%">开户行</td><td width="20%">开户行号</td>
	         		 </tr>
			           <tr align=center >
			           <td >我司垫款账户<font color="red">*</font><span id="myBtn" class="sq-button sq-button-round" onclick="queryMy()">选择</span>
			           <input  style="display: none;" id="sysBkAccInfoId" name="sysBkAccInfoId" value="${fncPrjBscInfoVO.sysBkAccInfoId}">
						</td>
						<td id="accNm">${mybank.accNm }</td><td id="accNo">${mybank.accNo }</td>
						<td id="bkNm">${mybank.bkNm }</td><td id="bkNo">${mybank.sysBkInfoVO.bkNo }</td>
			          </tr>
			          <tr align=center >
			          <td>机构收款账户<font color="red">*</font><span id="zyBtn" class="sq-button sq-button-round" onclick="queryZy()">选择</span>
			          <input  style="display: none;" id="bankAccInfoId" name="bankAccInfoId" value="${fncPrjBscInfoVO.bankAccInfoId}">
						</td>
						<td id="accNmZy">${zybank.accNm }</td><td id="accNumZy">${zybank.accNum }</td>
						<td id="banAccNmZy">${zybank.banAccNm }</td><td id="banAccNumZy">${zybank.banAccNum }</td>
			          </tr>
	          </table>
          </div>
          <div class="fieldBox col_50">
           <div class="label">垫款规则<font color="red">*</font></div>
            <div class="field">
            <input  style="display: none;" id="capAdvRuleInfoId" name="capAdvRuleInfoId" value="${fncPrjBscInfoVO.capAdvRuleInfoId}">
			        
            <span id="gBtn" class="sq-button sq-button-round" onclick="queryG()">选择</span>
            </div>
          </div>
          <div  class="btnsBox">
	          <table style="BORDER-COLLAPSE: collapse;margin-bottom:20px" borderColor=#ECECEC height=40 cellPadding=1 width="100%" align=center border=1> 
					 <tr align=center  style="background:#E7FEF4">
			          <td width="20%">规则名称</td><td width="15%">垫款执行时间</td><td width="10%">逾期金额</td>
			          <td width="10%">逾期天数</td><td width="20%">垫款基数</td><td width="15%">垫款颗粒度</td><td width="10%">垫款期数</td>
			        </tr>
			        <tr align=center >
				           <td id="ruleNm">${rule.ruleNm }</td><td id="advCycCdNm">${rule.advCycCdNm }</td> <td id="advMinAmt">${rule.advMinAmtNm }</td>
							 <td id="minOvdDay">${rule.minOvdDayNm }</td><td id="advBaseCdNm">${rule.advBaseCdNm }</td> <td id="advTypCdNm">${rule.advTypCdNm }</td><td id="advPd">${rule.advPd }</td>
				       </tr>
			         
	          </table>
          </div>
            -->    
      </div>
       <!-- 分账信息插入 -->
       <div id="div_split_account" style="display:none" >
      		<table id="tableBank2" class="sq-formTable no-border" >
				<thead>
					<tr>
					    <th class="tbLabel" style="text-align: center;background:#e7fef4;">支付通道</th>
						<th class="tbLabel" style="text-align: center;width:15% ;background:#e7fef4;" >分账账户</th>
						<th class="tbLabel" style="text-align: center;width:10% ; background:#e7fef4;">分账比例</th>
						<th class="tbLabel" style="text-align: center;width:10% ;background:#e7fef4;" >是否存在备用通道</th>
						<th class="tbLabel" style="text-align: center;width:15% ; background:#e7fef4;">机构名称</th>
						<th class="tbLabel" style="text-align: center;width:5% ; background:#e7fef4;">机构code</th>
						<th class="tbLabel" style="text-align: center;width:10%; background:#e7fef4;border-right: 1px solid #e9e9e9; ">
							<span>操作 </span>
							<a href="javascript:void(0)" onclick="addRowPrjTyp1()"  >
								<font style="color:#6495ED;">（添加）</font>
							</a>
						</th>
					</tr>
				</thead>
				<tbody>
			 	</tbody>
       		</table>
       </div>
   <div class="btnsBox">
               <span id="saveBtn" class="sq-button sq-button-round" onclick="save()"><!-- <i class="sqBtnIco_10"></i> -->保存</span>
               <span id="cancelBtn" class="sq-button sq-button-round" onclick="cancelBtn()"><!-- <i class="sqBtnIco_14"></i> -->取消</span>
             
            </div>
      

	         
         
        </form>
        </div>
              <div tabid="tabB" title="资产筛选" id="tabBId" style="display: none;">
                    <iframe frameborder="0" name="tabE" id="tabB" src=""></iframe>
             </div>
        </div>
        </div>
    </div>
 <!-- 增加备用账户弹出框 -->
<div id="addBackDiv" style="display:none;">
    <form id="addBackForm" ><!-- fncPrjId -->
         <span style="text-align: left;" class="btnsBox">
       		<span style="text-align: left;" id="saveBtn1" class="sq-button sq-button-round" onclick="addBackBtn();">添加</span>
	     </span>
         <div class="sqPanel_body">
             <div id="ligergrid_back" class="sq-grid"  ></div>
         </div>
        <div class="btnsBox">
           <input name="mainAccountId" id="mainAccountId" type="hidden" >
      		<span id="saveBtn1" class="sq-button sq-button-round" onclick="updatePayWayBack();">保存</span>
      		<span id="currentTr"></span>
        </div>
    </form>
</div>
    
	<script type="text/javascript">
	  var pageInApp={
	    		flag:true
	    };
	  var id ='${id}';
	  var selectOrgCd = "";
	   var searchOrgTree = null;
	  var firstNode = null;
	  var textName='${orgTextName}';//节点名称
	  var orgData = null;
		var id ="";//初始值
		var detailFlag = '${detailFlag}';
		var isFlow = '${isFlow}';
$(function () {
	initData();
	initSplitAccount();//初始化分账信息 by gengchunlan 20200325
});
	//初始化数据
	function initData(){
		//	initOrgTree();
     
		
		initcombobox();
		
		 initTab();
			$("#fnc_prj_bsc_info_form").ligerForm({
			    validate: true
			});
			 var ligerForm = liger.get("fnc_prj_bsc_info_form");
		 $("#fnc_prj_bsc_info_form").check_ligerFormEditor();
		
		/*  // 设置业务种类默认为禁用
		    var slt=liger.get("loanTypCd");
            slt.setDisabled();
 */
	
 
    $("#fncfiamt").html(new  Number("${fncPrjBscInfoVO.fncfiamt/100}"));
    $("#fncprjamt").html(new  Number("${fncPrjBscInfoVO.fncprjamt/100}"));
    initZy();
	}
	var pageInTab = null;
	  var loadedTabs=[]

	
	  

	  
   
	
	//初始化Tab
    function initTab(){
    	 pageInTab = $("#pageInTab").ligerTab({
             height: 'auto',
             contextmenu: false,
             minIframeHeight: GET_minIframeHeight(),
             onBeforeSelectTabItem: function (tabid) {
             	var id = $("#prjid").val();
             		//alert("id="+id);
             	 if(tabid!="tabA"){
 	             	if(id==null||id==''){
 	                	top.$.ligerDialog.SQalert({content:"请先保存项目基本信息", SQ_type: "warning"});
 	                	return false;
 	                } 
             	} 
             },
             onAfterSelectTabItem: function(tabid) {
              //   if (loadedTabs.indexOf(tabid)<0) {
                 	var id = $("#prjid").val();
                 	//alert("id="+id);
                 	 if(tabid!="tabA"){
 	                	if(id==null||id==''){
 	                		 top.$.ligerDialog.SQalert({content: LogUtils.LOG_PRJ__PRD_SELECT_BEFORE, SQ_type: "warning"});
 	                         return false; //验证不通过，不执行以下代码
 	                	}
                 	} 
                     loadedTabs.push(tabid);
                     switch (tabid){
                         case "tabB":
                             pageInTab.setTabItemSrc(tabid, "<%=path%>/rfbuss/fncprjbscinfo/viewAssPackInfoDetail.do?prjid="+id+"&&flag="+detailFlag);
                             break;
                         case "tabA":
                        	 window.location.href="<%=path%>/rfbuss/fncprjbscinfo/toAddPage.do?id="+id; 
                             break;
                             
                     }
            //     };
                 SetIframe_height();
             }
         });

         $.extend(true, pageInApp, {
             pageInTab: pageInTab
         });
    };
	//保存项目基础信息
	function save(){
        var ligerForm = liger.get("fnc_prj_bsc_info_form");
        if (!ligerForm.valid()) {
            top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO,SQ_type: "warning"});
            return false; //验证不通过，不执行以下代码
        }
        //判断如果参与垫款，则后面的不能为空
       if($("input[name='isAdv']:checked").val()=='1'){
        	if($("#sysBkAccInfoId").val()==''){
        		alert("请选择我司垫款账户！");
        		return false;
        	}
        	if($("#bankAccInfoId").val()==''){
        		alert("请选择机构收款账户！");
        		return false;
        	}
        	if($("#capAdvRuleInfoId").val()==''){
        		alert("请选择垫款规则！");
        		return false;
        	}
        }
        
        var check=checkprjname(ligerForm);
        
        if(check){
        	return false;
        }
        
	    				
     	    	
	}
	//取消
	function cancelBtn(){
		  var TAB=top.mainApp.parentTab;
          var currentTabid=TAB.getSelectedTabItemID();
        // windows.parent.reload();
 	       if(top.tab.isTabItemExist("${currentTabid}")){
 	        	  top.tab.reload("${currentTabid}");  
 	          }
		 top.tab.removeTabItem(currentTabid);
		
	}
var frilist = [];
<c:if test="${not empty frilist}"> frilist = ${frilist}; </c:if>
var scmlist=[];
<c:if test="${not empty scmlist}"> scmlist = ${scmlist}; </c:if>	
var countrylist=[];
<c:if test="${not empty countrylist}"> countrylist = ${countrylist}; </c:if>
var bustypelist=[];
<c:if test="${not empty bustypelist}"> bustypelist = ${bustypelist}; </c:if>

var firtypelist=[];
<c:if test="${not empty firtypelist}"> firtypelist = ${firtypelist}; </c:if>
	 function initcombobox(){
		 var scmid="${fncscmid}";
		 var bustype="${bustype}";
		
		 if(scmid!=""){
			 $("#crsbj").ligerComboBox({
	     		   url:'<%=path%>/rfbuss/fncprjbscinfo/getCrsbjList.do?scmid='+scmid,
				        ajaxType :'GET', 
	     	          selectBoxWidth: 270,
	     	          selectBoxHeight: 150,
	     		      valueField: "key", 
	     		      textField: "value",
	     		    
	     		     }); 
	         liger.get("crsbj").selectValue("${fncPrjBscInfoVO.crsbj}");	 
		 }
		 if(bustype!=""){
			 $("#bustype").ligerComboBox({
       		   url:'<%=path%>/rfbuss/fncprjbscinfo/getBusTypeList.do?busType='+bustype,
			        ajaxType :'GET', 
       	          selectBoxWidth: 270,
       	          selectBoxHeight: 150,
       		      valueField: "key", 
       		      textField: "value",
       		    
       		     }); 
	         liger.get("bustype").selectValue(bustype);	 
		 }
		 
		 var scmbox= $("#fncscmid").ligerComboBox({ 
	      data: null, 
          selectBoxWidth: 270,
          selectBoxHeight: 150,
	      valueField: "fncScmId", 
	      textField: "fncScmNm",
	     
	      });
	      
	      
	   $("#instypecd").ligerComboBox({
	      data: null, 
          selectBoxWidth: 270,
          selectBoxHeight: 150,
	      valueField: "key", 
	      textField: "value",
	    
	     });
	   
	   
           var combobox=  $("#fncinsid").ligerComboBox({
    	     data:frilist,
             selectBoxWidth: 270,
             selectBoxHeight: 150,
             valueField: "id",
             textField: "fundRasInsNm",
             autocomplete: function (e){ //机构模糊自动匹配-JL-20190822
				filter_autoComboboxData(e.key, this);
				e.show();
			 },
             onSelected: function ()
             {
             var obj=combobox.getSelected();
               var newData1 = new Array();
              
               
    
                    for (i = 0; i < firtypelist.length; i++)
                    {
                     
                        if (firtypelist[i].key == obj.insTypeCd)
                        {
                        
                            newData1.push(firtypelist[i]);
                        }
                    }
               liger.get("instypecd").setData(newData1);
               liger.get("instypecd").selectValue(obj.insTypeCd);

      
              //fncscmid
               var newData = new Array();
                    for (i = 0; i < scmlist.length; i++)
                    {
                        if (scmlist[i].fncInsId == obj.id)
                        {
                            newData.push(scmlist[i]);
                        }
                    }
                    scmbox= $("#fncscmid").ligerComboBox({ 
              	      data: newData, 
                        selectBoxWidth: 270,
                        selectBoxHeight: 150,
              	      valueField: "fncScmId", 
              	      textField: "fncScmNm",
              	      onSelected: function ()
                        {
              	    	  var obj=scmbox.getSelected();
              	    //	 alert(obj.fncScmId);
                     	   $("#crsbj").ligerComboBox({
                     		   url:'<%=path%>/rfbuss/fncprjbscinfo/getCrsbjList.do?scmid='+obj.fncScmId,
              			        ajaxType :'GET', 
                     	          selectBoxWidth: 270,
                     	          selectBoxHeight: 150,
                     		      valueField: "key", 
                     		      textField: "value",
                     		    
                     		     }); 
                     	   $("#bustype").ligerComboBox({
                     		   url:'<%=path%>/rfbuss/fncprjbscinfo/getBusTypeList.do?busType='+obj.busType,
              			        ajaxType :'GET', 
                     	          selectBoxWidth: 270,
                     	          selectBoxHeight: 150,
                     		      valueField: "key", 
                     		      textField: "value",
                     		    
                     		     }); 
                     	  liger.get("bustype").selectValue(obj.busType);
                        }
              	      });
                    if(obj.id!="${fncinsid}"){
                    	liger.get("crsbj").selectValue("");
                    	liger.get("fncscmid").selectValue("");
                    	liger.get("bustype").selectValue("");
                    }
                 //帐号批次
                 $("#limId").ligerComboBox({
		                	//   columns: [{ header: '帐号', name: 'accNo', width: 100}, 
			      	 	    //               { header: '批次', name: 'batNo', width: 120},
		          			//	],
                     		   url:'<%=path%>/rfbuss/fncpreabslim/initListAll.do?insId='+obj.id,
                     		   ajaxType :'GET',
	          	 	            width: 200, 
	          	 	            isMultiSelect: false,
	          	 	            isShowCheckBox:false,
	          	 	            slide: false,
	          	 	            selectBoxWidth: 500, 
	          	 	            selectBoxHeight: 740,
                     		      valueField: "id", 
                     		      textField: "accbatNo",
                     		                         		      
                     		    
                  });
                 liger.get("limId").selectValue(${fncPrjBscInfoVO.limId});
                 //清空机构账户
                    $("#accNumZy").html('');
                    $("#accNmZy").html('');
                    $("#banAccNmZy").html('');
                    $("#banAccNumZy").html('');
                    $("#bankAccInfoId").val('');
                    
             }
           
         });
           
          var ctycombobox=  $("#country").ligerComboBox({
    	     data:countrylist,
             selectBoxWidth: 270,
             selectBoxHeight: 150,
             valueField: "key",
             textField: "value",
             onSelected: function ()
             {
             }
         });
      /*
       var btcombobox=  $("#bustype").ligerComboBox({
    	     data:bustypelist,
             selectBoxWidth: 270,
             selectBoxHeight: 150,
             valueField: "key",
             textField: "value",
             onSelected: function ()
             {
             }
         });
      
      */
       
  	  
           
    	    liger.get("country").selectValue("${country}");
    	    liger.get("fncscmid").selectValue("${fncscmid}");
    	    liger.get("fncinsid").selectValue("${fncinsid}"); 
      	    liger.get("fncinsid").selectValue("${fncinsid}"); 
    	     var newData2 = new Array();
    
                    for (i = 0; i < firtypelist.length; i++)
                    {
                     
                        if (firtypelist[i].key == "${instypecd}")
                        {
                        
                            newData2.push(firtypelist[i]);
                        }
                    }
                    
                    //fncscmid
                    var newData3 = new Array();
                         for (i = 0; i < scmlist.length; i++)
                         {
                             if (scmlist[i].fncInsId ==  "${fncinsid}")
                             {
                                 newData3.push(scmlist[i]);
                             }
                         }
               liger.get("fncscmid").setData(newData3);
               liger.get("instypecd").setData(newData2);
               liger.get("instypecd").selectValue("${instypecd}");
               liger.get("fncscmid").selectValue("${fncscmid}");
    }
	 
	
		function checkprjname(ligerForm) {
			
			var dataId = $("#prjid").val();
			var dataNm = $("#fncprjnm").val();
			var flag = false;
			var url = '<%=path%>/rfbuss/fncprjbscinfo/getprjbyname.do';
			var params = {};
				  params.id = dataId;//项目名称
				  params.fncprjnm = dataNm;//项目名称
				  params.limId=liger.get("limId").getValue();
		        $.ajax({
		    		type: 'get',
		    		dataType:'json',
		    		data:params,
		    		url: url,
		    		success:function(msg){
		    			 if(msg.success == 1){
		    				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
		    				 flag = true;
		    			 }else{
		    				  var data = ligerForm.getData();
		    			       data["id"]=$("#prjid").val();
		    			       if(data["orgCd"]==""){
		    			       data["orgCd"]='${orgCd}';
		    			       }
		    			       //isSplitAccount 是否分账 splitAccount 分账账户
		    			       var isSplitAccount = $('#isSplitAccount').val();
		    			       if(isSplitAccount == 1){
		    			    	   //校验分账账户
		    			    	  //var spArr= checkSplitAccount();
		    			    		//分账账户信息
			    					var splitAccountArray = [];
			    					var accountTr = $('#tableBank2 tbody tr');
			    					var vaRatio=0;//校验分账比例是否合规填写
			    					for (var i = 0; i < accountTr.length; i++) {
			    						var payMay=$.trim($(accountTr[i]).find("select[name='payMay']").val());
			    						var splitAccount = $.trim($(accountTr[i]).find("input[name='splitAccount']").val());
			    						var splitRatio = $.trim($(accountTr[i]).find("input[name='splitRatio']").val());
			    						var split_id = $.trim($(accountTr[i]).find("input[name='split_id']").val());
			    						var s_fundInsId = $.trim($(accountTr[i]).find("input[name='s_fundInsId']").val());
			    						splitAccount = splitAccount.replace(/\s*/g,"");//账户去掉所有空格
			    						//校验账户信息
			    						if(true){
			    							if(null == payMay || ''==payMay){
			    								$.ligerDialog.alert('请选择支付通道!');
					    						return;
				    						}
			    							if(null == splitAccount || ''==splitAccount){
			    								$.ligerDialog.alert('请填写分账账户信息!');
					    						return;
				    						}
			    							if(null == splitRatio || ''==splitRatio){
			    								$.ligerDialog.alert('请填写分账比例!');
					    						return;
				    						}
			    							console.log("零"+parseFloat(splitRatio));
			    							if(parseFloat(splitRatio)=='0'){
			    								$.ligerDialog.alert('分账比例须大于0!');
					    						return;
			    							} 
			    							if(null == s_fundInsId || ''==s_fundInsId){
			    								$.ligerDialog.alert('请选择机构名称!');
					    						return;
			    							}
			    						}
			    						var account = {
			    							"id":split_id,
			    							"payMay":payMay,
			    							"splitAccount" : splitAccount,
			    							"splitRatio" : splitRatio,
			    							"fundInsId":s_fundInsId
			    						}
			    						splitAccountArray.push(account);
			    						vaRatio+=parseFloat(splitRatio);
			    					}
			    					 var zz=parseFloat(vaRatio);
			    					 var h=Math.round((zz)*100)/100;
			    					 console.log(zz+"zz"+"h"+h);
			    					if(splitAccountArray.length <1){
			    						$.ligerDialog.alert('请输入分账账户信息!');
			    						return;
			    					}
			    					if(splitAccountArray.length>5){
			    						$.ligerDialog.alert('最多有5条分账账户数据！');
			    						return;
			    					}
			    					if(h>100){
			    						$.ligerDialog.alert('分账比例相加必须小于等于100%，请重新输入!');
			    						return;
			    					}
			    					//校验同一支付通道，账户信息不能一样
			    					for(j = 0; j < splitAccountArray.length; j++) {
			    						for(k = j+1; k < splitAccountArray.length; k++) {
	   										if(splitAccountArray[j].payMay==splitAccountArray[k].payMay){
	   											if(splitAccountArray[j].splitAccount==splitAccountArray[k].splitAccount){
	   												$.ligerDialog.alert('分账信息相同，请重新输入!');
	   					    						return;
		   										}
	   										}else if(splitAccountArray[j].payMay!=splitAccountArray[k].payMay){
	   											$.ligerDialog.alert('支付通道不相同，请重新输入!');
   					    						return;
	   										}
										}
									} 
			    					console.log("splitAccountArray"+splitAccountArray);
			    					data["splitAccountArray"] = JSON.stringify(splitAccountArray);
		    			       }//end  isSplitAccount
		    			      
		    			       data["spFlag"] ="101";//再融资新建项目分账标识
	    			    	   spFlag="101";
		    			       console.log(data);
		    			        var url = '<%=path%>/rfbuss/fncprjbscinfo/add.do';

		    			        var wait_dialog;
		    			        $.ajax({
		    			    		type: 'post',
		    			    		dataType:'json',
		    			    		data:data,
		    			    		url: url,
		    			    		beforeSend: function(){
		    					          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
		    					     },
		    			    		success:function(msg){
		    			    			 wait_dialog.close();
		    			    			 if(msg.success == 1){
		    			    			 	top.$.ligerDialog.SQalert({content: "操作成功!",SQ_type: "success"});
		    						        $("#prjid").val(msg.data);
		    						        //Remove_navTab();
		    						        if(spFlag='101'){
		    						            //alert("sp"+spFlag);
		    						        	updateSplitAccount(msg.info);
		    						        }
		    			    			 }else{
		    			    				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
		    			    			 }
		    			    		}
		    			    	});
		    				 
		    			 }
		    		}
		    	});
				  return flag;
		}
		
    </script>
    <script type="text/javascript">
	//选择我司垫款账户
	function queryMy(){
		
        $.ligerDialog.open({  title: '我司垫款账户',height: 500,width: 850, url: '<%=path%>/system/sysBkAccInfo/toChooseListPage2.do?flag=dk'});
	}
	//选择机构账户
	function queryZy(){
		var fundRasInsId=${fncinsid};
        $.ligerDialog.open({  title: '机构账户',height: 500,width: 850, url: '<%=path%>/rfbase/fribaseinfo/toChooseListPage.do?fundRasInsId='+fundRasInsId });
	}
	//选择垫款规则
	function queryG(){
		 $.ligerDialog.open({  title: '垫款规则',height: 500,width: 1000, url: '<%=path%>/capital/capAdvRuleInfo/toChooseListPage.do' });
	}
	
	
	</script>
	<script type="text/javascript">
	var b=0;
	//初始化
	function initZy(){
		
		$("#accNumZy").html('${zybank.accNum }');
	    $("#accNmZy").html('${zybank.accNm }');
	    $("#banAccNmZy").html('${zybank.banAccNm }');
	    $("#banAccNumZy").html('${zybank.banAccNum }');
	    $("#bankAccInfoId").val('${zybank.id }');
	}
	//是否分账=是”时，前端显示该字段并必填；
	function isShowAccount(obj){
		var val = $(obj).val();
		if(val=='1'){
			$("#div_split_account").show();
		}else{
			$("#div_split_account").hide();
			$('#splitAccount').val("");
		}
	}
	//初始化分账信息数据
	function initSplitAccount(){
		var splitArrayJSON= '${splitArrayJSON}';
		var splitArr=eval(splitArrayJSON);
		console.log("splitArr"+splitArr);
		if(splitArr!=null && splitArr.length>0){
			for(var i = 0 ;i<splitArr.length ; i++){
				console.log(splitArr[i].fundInsNm);
				addRowPrjTyp(++b);
				var bankTr = $('#tableBank2 tbody tr:eq('+i+')');
				bankTr.find("select[name='payMay']").find("option[value='"+splitArr[i].payMay+"']").attr("selected",true);
				bankTr.find("input[name='splitAccount']").val(splitArr[i].splitAccount);
				bankTr.find("input[name='splitRatio']").val(splitArr[i].splitRatio);
				bankTr.find("input[name='isBack']").val(splitArr[i].isBack);
				if(splitArr[i].isBack =='' || splitArr[i].isBack =='undefined' || splitArr[i].isBack == null){
					bankTr.find("input[name='isBack']").val('否');
				}
				bankTr.find("input[name='split_id']").val(splitArr[i].id);
				bankTr.find("input[name='s_fundInsId']").val(splitArr[i].fundInsId);
				bankTr.find("input[name='s_fundInsNm']").val(splitArr[i].fundInsNm);
				bankTr.find("input[name='s_insCode']").val(splitArr[i].insCode);
				initFundName(i,splitArr[i].fundInsNm,splitArr[i].fundInsId);
			}//end for
		}//end length
		
	}
	function addRowPrjTyp(b){
		console.log("add"+b);
		//目前最多只能添加5个账户
		$('#tableBank2 tbody').append('<tr>'+
				'<td style="text-align: center;">'+
					'<div class="field">'+
						'<select name="payMay"    data-value=" ">'+
						    '<option value=" ">请选择</option>'+
							'<c:forEach items="${payMayList }" var="kv">'+
								'<option value="${kv.key }">${kv.value }</option>'+
							'</c:forEach>'+
						'</select>'+
					'</div>'+
				'</td>'+
				'<td style="text-align: center;">'+
					'<div class="field">'+
						'<input name="splitAccount" type="text" class="ui-textbox" value="" validate="{number:true, maxlength:32}" size=26>'+
						'<input name="split_id" type="hidden" class="ui-textbox"  >'+
						'</div>'+
				'</td>'+
				'<td style="text-align: center;">'+
					'<div class="field">'+
						'<input name="splitRatio" type="text" class="ui-textbox" value="" validate="{number:true, maxlength:5,decimal:true}" size=10>'+"%"+
					'</div>'+
				'</td>'+
				'<td style="text-align: center;">'+
				'<div class="field">'+
					'<input name="isBack" type="text" class="ui-textbox" value="否" disabled validate="{number:true, maxlength:32}" size=10>'+
					'</div>'+
				'</td>'+
				'<td style="text-align: center;">'+
					'<div class="field">'+
						'<input name="s_fundInsNm" type="text" class="ui-textbox xia "  value="" placeholder="请选择"  ltype="combobox"  size=20>'+
						'<input name="s_fundInsId" type="hidden" class="ui-textbox"  >'+
					'</div>'+
				'</td>'+
				'<td style="text-align: center;">'+
					'<div class="field">'+
						'<input name="s_insCode" type="text" readonly class="ui-textbox" value="" size=10 >'+
					'</div>'+
				'</td>'+
				'<td style="text-align: center;border-right: 1px solid #e9e9e9;">'+
					'<a href="javascript:void(0)" onclick="delRow2(this)">'+
						'<font style="color:#6495ED;">删除</font>'+
					'</a>'+
					'||'+
					'<a href="javascript:void(0)" onclick="addBack(this)">'+
						'<font style="color:#6495ED;">【编辑备用通道】</font>'+
					'</a>'+
				'</td>'+
			'</tr>');
		 ++b;
		 initFundNm();
	}
	function delRow2(obj){
		$(obj).parent().parent().remove();
		b--;
		console.log("闪"+b);
	}
	//校验分账信息是否已超过5行
	function addRowPrjTyp1(){
		console.log("tt@"+b);
		if(b>4){
			top.$.ligerDialog.SQalert({content: "最多分5个账户!",SQ_type: "success"});
		}else{
			addRowPrjTyp(++b);
		}
	}
	</script>
	<script type="text/javascript">
	//备用通道
    var payMayBackJSON = [];
    <c:if test="${not empty payMayBackJSON}"> payMayBackJSON = ${payMayBackJSON}; </c:if>
    
	function initFundName(index,t_fundInsNm,t_fundInsId){
	   var bankObj = $('#tableBank2 tbody tr :eq('+index+') ');
       bankObj.find("input[name='s_fundInsNm']").val(t_fundInsNm);
	   var thisObj = bankObj.find("input[name='s_fundInsNm']").ligerComboBox({
		    data:frilist,
	        selectBoxWidth: 270,
	        selectBoxHeight: 150,
	        valueField: "id",
	        textField: "fundRasInsNm",
	        autocomplete: function (e){ //机构模糊自动匹配-JL-20190822
				filter_autoComboboxData(e.key, this);
				e.show();
			 },
	        onSelected: function (){
	        	var obj=thisObj.getSelected();
	          	var newData1 = new Array();
	               for (i = 0; i < firtypelist.length; i++){
	                   if (firtypelist[i].key == obj.insTypeCd){
	                       newData1.push(firtypelist[i]);
	                   }
	               }
		        //二级联动机构code 
		        var ss_fundInsId=obj.id;
		        bankObj.find("input[name='s_fundInsId']").val(ss_fundInsId);
		        if(ss_fundInsId!=null && ss_fundInsId!=''){
		        	$.ajax({
		                type: 'post',
		                dataType: 'json',
		                url: '<%=path%>/rfbase/fribaseinfo/getById.do?id='+obj.id,
		                success: function (msg) {
		                	console.log(msg.data);
		                	var crr=msg.data;
		                	bankObj.find("input[name='s_insCode']").val(crr.insCode);
		                }
	              });
		        }//end 二级联动
	        },//on selected
			onChangeValue:function(){
				 bankObj.find("input[name='s_insCode']").val(""); 
				 bankObj.find("input[name='s_fundInsId']").val("");
			}
	    });
   }
   function initFundNm(){
	   $('.xia').each(function(index, el) {
		   var cuTdObj=$(el);
		   var cuTrObj=$(el).parent().parent().parent();
		   var thisObj = $(el).ligerComboBox({
			    data:frilist,
		        selectBoxWidth: 270,
		        selectBoxHeight: 150,
		        valueField: "id",
		        textField: "fundRasInsNm",
		        autocomplete: function (e){ //机构模糊自动匹配-JL-20190822
					filter_autoComboboxData(e.key, this);
					e.show();
				 },
		        onSelected: function (){
		        	var obj=thisObj.getSelected();
		          	var newData1 = new Array();
		               for (i = 0; i < firtypelist.length; i++){
		                   if (firtypelist[i].key == obj.insTypeCd){
		                       newData1.push(firtypelist[i]);
		                   }
		               }
			        //二级联动机构code 
			        var ss_fundInsId=obj.id;
			        $(cuTrObj).find("input[name='s_fundInsId']").val(ss_fundInsId);
			        if(ss_fundInsId!=null && ss_fundInsId!=''){
			        	$.ajax({
			                type: 'post',
			                dataType: 'json',
			                url: '<%=path%>/rfbase/fribaseinfo/getById.do?id='+obj.id,
			                success: function (msg) {
			                	console.log(msg.data);
			                	var crr=msg.data;
			                	$(cuTrObj).find("input[name='s_insCode']").val(crr.insCode);
			                }
		              });
			        }
		        },//on selected
			  onChangeValue:function(){
				  $(cuTrObj).find("input[name='s_insCode']").val("");
				  $(cuTrObj).find("input[name='s_fundInsId']").val("");
			  }
		    });
       });
   }
   //新增 备用通道弹窗
   function  addBack(obj){
	    $('#mainAccountId').val("");//清空备用通道div 主账户id
	 	var mainAccountId = $(obj).parent().parent().find("input[name='split_id']").val();//主账户id
	 	var isBack =$(obj).parent().parent().find("input[name='isBack']").val();//是否存在备用通道
	 	var currenTr=$(obj).parent().parent();//获取当前主账户对象obj
	 	//alert(mainAccountId+"@"+obj);
	   	if(mainAccountId == '' || mainAccountId == null || mainAccountId == 'undefined'){
	   		top.$.ligerDialog.SQalert({content: "请先点击保存按钮，再添加主通道!",SQ_type: "success"});
	   		return ;
	   	}
	   	$('#mainAccountId').val(mainAccountId);//赋值备用通道div 为当前主账户id
	   $.ligerDialog.open({
           width: 500,
           height: 300,
           isResize: true,
           title : '备用通道',
           target: $("#addBackDiv"),
           onHideDialog: function () {
               clearLigerForm("addBackForm");
           }
       });
	   
	   var ligerForm = $("#addBackForm").ligerForm({validate: true});
	   initBackGrid(mainAccountId,currenTr);
   }
 //初始化备用账户信息
   function initBackGrid(mainAccountId,obj) {
	//主账户id
   	if(mainAccountId == '' || mainAccountId == null || mainAccountId == 'undefined'){
   		top.$.ligerDialog.SQalert({content: "请先点击保存按钮，再添加主通道!",SQ_type: "success"});
   		return ;
   	}
   	$('#currentTr').val(obj);//把当前对象暂时放到这个地方
   	
   	var fncPrjId = $("#prjid").val();//再融资项目id
    backGrid = $("#ligergrid_back").ligerGrid({
            url: '<%=path%>/rfbuss/fncprjbscinfo/initBackList.do?',
	    	method : 'get',
	    	parms:{"fncPrjId":fncPrjId,"mainAccountId":mainAccountId},
	    	async: false,
	    	columns: [
		    		{ display: '备用支付通道', name: 'payMay', width: 100,
						editor: {
	                       type: 'select',
	                       data: payMayBackJSON,
	                       valueField: 'key',
	                       textField: 'value',
						},
						valueField: 'payMay',
						textField: 'payMayNm',
						render: function (item) {
							return item.payMayNm;
						},
						validate: function (value) {
						  if (StringUtils.isEmpty(value)) return "此项为必填项！";
						}
	  	            },
					{ display: '备用分账账户', name: 'splitAccount', width: 200, editor: {type: 'text'},
                       validate: function (value,rowData,col) {
                           if (StringUtils.isEmpty(value)) return "此项为必填项！";
                       },maxlength: 50, min:1     // 最大长度
					},
	  	            
	   	  	        { display: '操作', minWidth: 100 , align:'left',
		            	render: function (rowdata, rowindex, value){
		                	var d = "";
                            if (rowdata.id) {
                                d = '<a class="sq-button-hasicon" href="javascript:deleteDB(';
                                d += "'" + rowdata.__id + "'";
                                d += ",'" + rowdata.id + "'";
                                d += ')"><i class="sqBtnIco_7"></i>删除</a>';
                            }else{
                            	d='<a class="sq-button-hasicon" href="javascript:deletePage(';
								d+="'"+rowdata.__id+"'";
								d+=')"><i class="sqBtnIco_7"></i>删除</a>';
								}
		                    return d;
		            	}
					}],
	   	  	   usePager: false,
	           root: 'rows',
	           record: 'total',
	           hideLoadButton: true,
	           resizable: false, 
	           width: 470,
	           height: 250,
	           //heightDiff: -2,
			   enabledEdit: true,
	           isScroll: false,
	           checkbox: false,
	           rownumbers: true,
	           allowUnSelectRow: true,
	           alternatingRow: false,
	           enabledSort:false,
	    });
	};
    //新增备用账户
    function addBackBtn() {
        var manager = $("#ligergrid_back").ligerGetGridManager();
        manager.addRow({
        	payMay: '',
        	splitAccount: ''
        });
    };
	//本地删除
	function deletePage(rowdata_id) {
        $.ligerDialog.confirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
            if (flag == false) return;
            //删除页面
            backGrid.deleteRow(rowdata_id);
        })
	}
	//修改备用账户信息为isdel=1
	function deleteDB(rowdata_id, _id) {
		//获取当前分账主账户对象
    	var trObj=$('#currentTr').val();//
    	var cIsBack=$(trObj).find("input[name='isBack']").val();
    	console.log(cIsBack+"rr");
    	
    	var backJson=backGrid.getData();
	   //删除此条备用账户
	   $.ligerDialog.confirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
	   if (flag == false) return;
	   var wait_dialog;
	   		$.ajax({
	   		type: 'post',
	   		dataType: 'json',
	   		data: {"rl_split_id": _id},
	        url: '<%=path%>/rfbuss/fncprjbscinfo/updateBackPayWayById.do?',
	        beforeSend: function () {
	                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
	        },
	        success: function (msg) {
                wait_dialog.close();
                if (msg.success == 1) {
                	backGrid.deleteRow(rowdata_id);//页面删除
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                    var dbackGrid=backGrid.getData();
                    if(dbackGrid!=null && dbackGrid.length>0){
   					 	$(trObj).find("input[name='isBack']").val("是");
   				    }else{
   				    	$(trObj).find("input[name='isBack']").val("否");
   				    }
                } else {
                    $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                }
	         }
	      });
	    });
	}
    //修改保存分账备用通道
    function updatePayWayBack(){
    	
    	var mainAccountId =$('#mainAccountId').val();
    	var fncPrjId =$("#prjid").val();
    	if(StringUtils.isEmpty(mainAccountId)) return;
    	//获取当前分账主账户对象
    	var trObj=$('#currentTr').val();//
    	var cIsBack=$(trObj).find("input[name='isBack']").val();
    	console.log(cIsBack+"rr");
    	//保存
    	var url = '<%=path%>/rfbuss/fncprjbscinfo/saveBackPayWay.do';
    	var ligerForm = liger.get("addBackForm");
    	var data = ligerForm.getData();
    	if (!ligerForm.valid()) {
	    	$.ligerDialog.SQalert({content:LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning",SQ_showButtons: true});
            return false ; 
     	}
    	var isValid = SQ.validGrid('ligergrid_back');
        if (isValid == false) {
            $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO , SQ_type: "warning" });
            return false;
        }
    	
    	var backJson=backGrid.getData();//备用通道，通道方式不能相同
    	if(backJson!=null && backJson.length>1){
    		for(var j = 0; j < backJson.length; j++){
    			for(k = j+1; k < backJson.length; k++) {
    				if(backJson[j].payMay==backJson[k].payMay){
    					$.ligerDialog.alert('备用支付通道不能相同，请重新输入!');
    					return;
    				}
    		   }
           }
    		
    	}
    	//封装数据
    	data["backJson"] = JSON.stringify(backGrid.getData());
    	data["mainAccountId"]=mainAccountId;
    	data["fncPrjId"]=fncPrjId;
    	var wait_dialog;
        $.ajax({
    		type: 'post',
    		dataType:'json',
    		data: data,
    		url: url,
    		beforeSend: function(){
    	          wait_dialog=top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
    	     },
    		success:function(msg){
    			 wait_dialog.close();
    			 if(msg.success == 1){
    				 backGrid.reload();
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "success"});
    				 if(backJson!=null && backJson.length>0){
    					 $(trObj).find("input[name='isBack']").val("是");
    				 }else{
    				    $(trObj).find("input[name='isBack']").val("否");
    				 }
    			 }else{
    				 top.$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
    			 }
    		}
    	});
    }
	//更新分账信息数据
	function updateSplitAccount(splitArr){
		if(splitArr=='新增成功!' || splitArr=='修改成功!'){
			return ;
		}
		var splitArr=eval(splitArr);
		console.log("splitArr=="+splitArr);
		if(splitArr!=null && splitArr.length>0){
			for(var i = 0 ;i<splitArr.length ; i++){
				console.log(splitArr[i].payMay);
				//addRowPrjTyp(++b);
				var bankTr = $('#tableBank2 tbody tr:eq('+i+')');
				bankTr.find("select[name='payMay']").find("option[value='"+splitArr[i].payMay+"']").attr("selected",true);
				bankTr.find("input[name='splitAccount']").val(splitArr[i].splitAccount);
				bankTr.find("input[name='splitRatio']").val(splitArr[i].splitRatio);
				bankTr.find("input[name='isBack']").val(splitArr[i].isBack);
				if(splitArr[i].isBack =='' || splitArr[i].isBack =='undefined' || splitArr[i].isBack == null){
					bankTr.find("input[name='isBack']").val('否');
				}
				bankTr.find("input[name='split_id']").val(splitArr[i].id);
				bankTr.find("input[name='s_fundInsId']").val(splitArr[i].fundInsId);
				bankTr.find("input[name='s_fundInsNm']").val(splitArr[i].fundInsNm);
				bankTr.find("input[name='s_insCode']").val(splitArr[i].insCode);
				initFundName(i,splitArr[i].fundInsNm,splitArr[i].fundInsId);
			}//end for
		}//end length
		
	}
	</script>
</body>
</html>